﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;

namespace TuringCup
{
    /// <summary>
    /// 表示游戏设置和参数的类
    /// </summary>
    [DataContract]
    public class GameConfig
    {
        /// <summary>
        /// 游戏速度 毫秒
        /// </summary>
        [DataMember]
        public int game_speed;
        /// <summary>
        /// 触手延伸速度
        /// </summary>

        [DataMember]
        public double t_speed;
        /// <summary>
        /// 触手单位长度携带能量
        /// </summary>

        [DataMember]
        public double t_density;

        /// <summary>
        /// Cell最大hp
        /// </summary>
        [DataMember]
        public double c_maxhp;

        /// <summary>
        /// 触手最大能量输出速度
        /// </summary>
        [DataMember]
        public double max_output = 0.9;

        /// <summary>
        /// 0-4级细胞能量输出速度
        /// </summary>
        [DataMember]
        public double[] output = { 8.0 / 100, 12.0 / 100, 16.0 / 100, 22.0 / 100, 30.0 / 100 };

        /// <summary>
        /// 0-4级细胞升级需要hp
        /// </summary>
        [DataMember]
        public double[] inchp = { 0.0, 15.0, 40.0, 80.0, 120.0 };

        /// <summary>
        /// 0-4级细胞降级所需hp
        /// </summary>
        [DataMember]
        public double[] dechp = { 5.0, 30.0, 60.0, 100.0 };

        /// <summary>
        /// hp恢复速度
        /// </summary>
        [DataMember]
        public double[] hp_recover = { 1.0 / 19, 1.0 / 18, 1.0 / 20, 1.0 / 24, 1.0 / 32 };


        /// <summary>
        /// 最多触手数量
        /// </summary>
        [DataMember]
        public int[] max_tent_num = { 1, 1, 2, 2, 3 };

        /// <summary>
        /// 构造函数,定义了一些常量
        /// </summary>
        public GameConfig()
        {
            game_speed = 100;
            t_density = 50.0 / 500 / 1.414;
            t_speed = 7;
            //c_produce 
            c_maxhp = 150.0;
        }
    }
}
